<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    {include file="public/_head"}
    <link href="/static/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
    <title>添加等级</title>
    <style>
        .input-text[type="number"] {
            width: 100%;
        }
    </style>
</head>
<body>
<article class="cl pd-20">
    <form action="" method="post" class="form form-horizontal" id="form-member-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">姓名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$data.name|default=''}" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">联系方式：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="number" class="input-text" value="{$data.phone|default=''}" readonly>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">身份证正面：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <img width="200" height="100" src="{$data.card_positive|default=''}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">身份证反面：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <img width="200" height="100" src="{$data.card_opposite|default=''}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">手持身份证：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <img width="200" height="100" src="{$data.hand_card|default=''}">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">审核类型：</label>
            <div class="formControls col-xs-8 col-sm-9 skin-minimal">
                <div class="radio-box" >
                    <input name="status" onclick="show(0)" type="radio" id="sex-1" value="2" checked>
                    <label for="sex-1">通过</label>
                </div>
                <div class="radio-box" >
                    <input type="radio" onclick="show(1)" id="sex-2" name="status" value="3">
                    <label for="sex-2">不通过</label>
                </div>
            </div>
        </div>
        <div class="row cl is_show" hidden>
            <label class="form-label col-xs-4 col-sm-3">不通过理由：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="{$data.remark|default=''}" id="remark">
            </div>
        </div>
        <input type="hidden" id="id" value="{$data.id|default=''}">
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="button" onclick="submit1()"
                       value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<!--_footer 作为公共模版分离出去-->
{include file="public/_footer" /}
<!--/_footer /作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/webuploader/0.1.5/webuploader.min.js"></script>
<script type="text/javascript">
    function show(x) {
        x?$(".is_show").show():$(".is_show").hide();
    }
    function submit1() {
        let remark = $('#remark').val();
        let status = $('input[name^="status"]:checked').val();
        let data = {
            id: $("#id").val(),
            remark: remark,
            status: status,
        };
        $.ajax1(this, '/anchor/check', 'post', data, function () {
            $.mag('添加成功', 1, 3000);
            parent.location.href = "/anchor/index";
        });
    }
</script>
</body>
</html>